<?xml version='1.0' encoding='ISO-8859-1' ?>
<!DOCTYPE html>
<html lang="pt-BR" xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui">

<f:view encoding="ISO-8859-1">
	<h:body>

		<ui:composition template="templates/modelo.xhtml">

			<ui:define name="content">
				<div class="container sections-wrapper">
					<div class="row">
						<div class="primary">
							<section class="about section">
								<div class="section-inner">
									<h2 class="heading">Alugar Livro</h2>
									<div class="content">
										<h:form id="form">

											<h:messages />
											<h:outputText style="color: #FF0000"
												value="#{usuarioMB.mensagem}"
												rendered="#{usuarioMB.comMensagem}"></h:outputText>

											<h:outputText style="color: #0000FF"
												value="#{usuarioMB.msgOk}" rendered="#{usuarioMB.comMsgOk}"></h:outputText>

											<h:inputHidden value="#{aluguelMB.livro.id}" />
											<h:inputHidden value="#{aluguelMB.livro.proprietario.id}" />

											<p>
												Titulo:
												<h:outputText value="#{aluguelMB.livro.titulo}" />
											</p>

											<p>
												ISBN:
												<h:outputText value="#{aluguelMB.livro.isbn}" />
											</p>

											<hr class="divider" />
											<div class="form-group">
												<h:commandButton id="botaoSalvar"
													styleClass="btn btn-cta-secondary" value="Solicitar"
													action="#{aluguelMB.solicitarAluguel}" />
											</div>


										</h:form>
									</div>
									<!--//content-->
								</div>
								<!--//section-inner-->
							</section>
							<!--//section-->
						</div>
					</div>
				</div>
			</ui:define>

		</ui:composition>

	</h:body>
</f:view>
</html>